// import Vue from 'vue'
let evaAppValue;
export const evaFiltersMixin = {
  data() {
    return {
      genderUl: [
        { val: 0, name: '女' },
        { val: 1, name: '男' },
      ],
      gradeUl: [
        { val: 1, name: '初中' },
        { val: 2, name: '高中' },
      ],
      moduleUl:[
        { name: '学科能力测试', val: 1 },
        { name: '综合能力测试', val: 2 },
      ],
      dimensionUl:[
        { name: '学习心态', val: 1 },
        { name: '学习素质', val: 2 },
        { name: '学习策略', val: 3 },
      ],
      evaStatusUl:[
        { val: 0, name: '未使用' },
        { val: 1, name: '已激活开始医院' },
        { val: 2, name: '已完成医院' },
        { val: 3, name: '已生成报告' },
      ],
      statusUl: [
        { val: 0, name: '有效' },
        { val: 1, name: '失效' },
      ],
    }
  },
  created() {
    evaAppValue = this;
  },
  methods: {

  },
  filters: {
    //性别
    genderFilters: function (type) {
      for(let i=0;i<evaAppValue.genderUl.length;i++){
        if(type == evaAppValue.genderUl[i].val){
          return evaAppValue.genderUl[i].name;
        }
      }
      return ''
    },
    //年级
    gradeFilters: function (type) {
      for(let i=0;i<evaAppValue.gradeUl.length;i++){
        if(type == evaAppValue.gradeUl[i].val){
          return evaAppValue.gradeUl[i].name;
        }
      }
      return ''
    },
    //医院模块
    moduleFilters: function (type) {
      for(let i=0;i<evaAppValue.moduleUl.length;i++){
        if(type == evaAppValue.moduleUl[i].val){
          return evaAppValue.moduleUl[i].name;
        }
      }
      return ''
    },
    //医院维度
    dimensionFilters: function (type) {
      for(let i=0;i<evaAppValue.dimensionUl.length;i++){
        if(type == evaAppValue.dimensionUl[i].val){
          return evaAppValue.dimensionUl[i].name;
        }
      }
      return ''
    },
    //医院进度
    evaStatusFilters: function (type) {
      for(let i=0;i<evaAppValue.evaStatusUl.length;i++){
        if(type == evaAppValue.evaStatusUl[i].val){
          return evaAppValue.evaStatusUl[i].name;
        }
      }
      return ''
    },
    //状态
    statusFilters: function (type) {
      for(let i=0;i<evaAppValue.statusUl.length;i++){
        if(type == evaAppValue.statusUl[i].val){
          return evaAppValue.statusUl[i].name;
        }
      }
      return ''
    },
  }
}